<?php
// +----------------------------------------------------------------------
// | Author: wyd 2025/8/27
// +----------------------------------------------------------------------

declare (strict_types=1);


namespace app\api\dao;

use app\api\model\WeChatMerchant;

class MerchantDao
{
    public function getSubMchid($id)
    {
        $wx = new WeChatMerchant();
        $subMchId = $wx->where('id',$id)->value('sub_mchid');
        if(empty($subMchId)){
            throw new \Exception('商户不存在');
        }
        return $subMchId;
    }
}